<!DOCTYPE html>
<html>
 <head lang="en"> 
  <meta charset="UTF-8" /> 
  <title>好头发网手机版 专注头发健康 拒绝脱发</title> 
  <link rel="stylesheet" href="css/reset.css" /> 
  <link rel="stylesheet" href="less/index.css" /> 
  <link rel="stylesheet" href="css/flexslider.css" />
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
  <meta name="keywords" content="{{$keywords}}"/>
  <meta name="description" content="{{$description}}"/>
  <meta name="baidu-site-verification" content="x1XYMzRXUS" />
 </head> 
 <body> 
  <header> 
   <div> 
    <img src="image/top-logo.png" /> 
    <span>好头发</span> 
   </div> 
   <img src="image/top-icon.png" /> 
  </header> 
  <section class="menu"> 
   <a href="http://www.haotoufa.com/">首页</a>
<a href="http://www.haotoufa.com/news/" target="_blank">头发资讯</a>
<a href="http://www.haotoufa.com/yangfahufa/" target="_blank">养发护发</a>
<a href="http://www.haotoufa.com/tfyy/" target="_blank">脱发原因</a>
<a href="http://tuofazenmeban.haotoufa.com" target="_blank">脱发解决</a>
<a href="http://faxing.haotoufa.com/" target="_blank">发型设计</a>
<a href="http://faxing.haotoufa.com/mxfx/" target="_blank">明星发型</a>
<a href="http://www.haotoufa.com/zhifa/" target="_blank">植发</a>
<a href="http://bbs.haotoufa.com/youhui.html" target="_blank">植发优惠</a>
<a href="http://www.haotoufa.com/zt/" target="_blank">植发案例</a>
<a href="http://bbs.haotoufa.com" target="_blank">论坛</a>
  </section> 
  <section id="Navigation" class="Navigation top"> 
  <a v-for="item in items" v-if="item.class_id ==1" href="/">@{{item.name}}</a> 
   <a v-for="item in items" v-if="item.class_id !=4 && item.class_id !=1" :href="&quot;/column/&quot;+item.class_id">@{{item.name}}</a> 
    <a v-for="item in items" v-if="item.class_id ==4" href="http://bbs.haotoufa.com/about/">@{{item.name}}</a> 
  </section> 
  <div class="Carousel flexslider" id="Carousel"> 
   <ul class="slides"> 
    <li v-for="item in items" @click="jump(item.id)"> <img :src="item.titlepic" /> 
     <div> 
      <span>@{{item.title}}</span> 
      <span></span> 
     </div> </li> 
   </ul> 
  </div> 
  <section class="main_show"> 
   <div class="NavGroup"> 
    <img src="image/hot.png" />
    <a href="http://bbs.haotoufa.com/youhui.html">植发优惠</a>
    <a href="http://www.haotoufa.com/zhifa/">植发知识</a>
    <a href="http://faxing.haotoufa.com/">发型设计</a> 
    <div class="list" id="news"> 
     <div class="list-member" v-for="item in items" @click="jump(item.id)"> 
      <div class="list-left" v-if='item.titlepic!=""'> 
       <img :src="item.titlepic" /> 
      </div> 
      <div class="list-right" v-if='item.titlepic!=""'> 
       <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
       <p>@{{item.title}}</p> 
      </div>
       <div class="list-right middle" v-if='item.titlepic==""'> 
       <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
       <p>@{{item.title}}</p> 
      </div>
     </div> 
     <div class="more" id="newsMore"> 
      <div>
       <span>更多</span> 
       <img src="image/much_right.png" />
      </div> 
     </div> 
    </div> 
   </div> 
  </section> 
    <section class="main_show"> 
   <div class="topImg" id="tuofabanner" @click="jump(id)"> 
    <img :src="titlepic" /> 
    <img src="image/hairlose.png" /> 
    <p>@{{title}}</p> 
   </div> 
   <div class="list" id="tuofa"> 
    <div class="list-member" v-for="item in items" @click="jump(item.id)"> 
     <div class="list-left" v-if='item.titlepic!=""'> 
      <img :src="item.titlepic" /> 
     </div> 
     <div class="list-right" v-if='item.titlepic!=""'> 
      <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
      <p>@{{item.title}}</p> 
     </div> 
     <div class="list-right middle" v-if='item.titlepic==""'> 
       <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
       <p>@{{item.title}}</p> 
      </div>
    </div> 
    <div class="more" id="tuofaMore"> 
     <div>
      <span>更多</span> 
      <img src="image/much_right.png" />
     </div> 
    </div> 
   </div> 
  </section> 
    <section class="main_show"> 
   <div class="topImg" id="zhifabanner" @click="jump(item.id)"> 
    <img :src="titlepic" /> 
    <img src="image/transplant.png" /> 
    <p>@{{title}}</p> 
   </div> 
   <div class="list" id="zhifa"> 
    <div class="list-member" v-for="item in items" @click="jump(item.id)"> 
     <div class="list-left" v-if='item.titlepic!=""'> 
      <img :src="item.titlepic" /> 
     </div> 
     <div class="list-right" v-if='item.titlepic!=""'> 
      <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
      <p>@{{item.title}}</p> 
     </div> 
     <div class="list-right middle" v-if='item.titlepic==""'> 
         <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
      <p>@{{item.title}}</p> 
      </div>
    </div> 
    <div class="more" id="zhifaMore"> 
     <div>
      <span>更多</span> 
      <img src="image/much_right.png" />
     </div> 
    </div> 
   </div> 
  </section> 
  <section class="main_show"> 
   <div class="topImg" id="faxingbanner" @click="jump(item.id)"> 
    <img :src="titlepic" /> 
    <img src="image/hairstyle.png" /> 
    <p>@{{title}}</p> 
   </div> 
   <div class="list" id="faxing"> 
    <div class="list-member" v-for="item in items" @click="jump(item.id)"> 
     <div class="list-left" v-if='item.titlepic!=""'> 
      <img :src="item.titlepic" /> 
     </div> 
     <div class="list-right" v-if='item.titlepic!=""'> 
      <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
      <p>@{{item.title}}</p> 
     </div> 
     <div class="list-right middle" v-if='item.titlepic==""'> 
      <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
      <p>@{{item.title}}</p> 
     </div> 
    </div> 
    <div class="more" id="faxingMore"> 
     <div>
      <span>更多</span> 
      <img src="image/much_right.png" />
     </div> 
    </div> 
   </div> 
  </section> 
  <section class="main_show"> 
   <div class="topImg" id="yangfabanner" @click="jump(item.id)"> 
    <img :src="titlepic" /> 
    <img src="image/haircare.png" /> 
    <p>@{{title}}</p> 
   </div> 
   <div class="list" id="yangfa"> 
    <div class="list-member" v-for="item in items" @click="jump(item.id)"> 
     <div class="list-left" v-if='item.titlepic!=""'> 
      <img :src="item.titlepic" /> 
     </div> 
     <div class="list-right" v-if='item.titlepic!=""'> 
      <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
      <p>@{{item.title}}</p> 
     </div> 
     <div class="list-right middle" v-if='item.titlepic==""'> 
      <a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a> 
      <p>@{{item.title}}</p> 
      </div>
    </div> 
    <div class="more" id="yangfaMore"> 
     <div>
      <span>更多</span> 
      <img src="image/much_right.png" />
     </div> 
    </div> 
   </div> 
  </section> 

  <footer> 
   <div id="Navigation_bottom" class="Navigation footer"> 
      <a v-for="item in items" v-if="item.class_id ==1" href="/">@{{item.name}}</a> 
   <a v-for="item in items" v-if="item.class_id !=4 && item.class_id !=1" :href="&quot;/column/&quot;+item.class_id">@{{item.name}}</a> 
    <a v-for="item in items" v-if="item.class_id ==4" href="http://bbs.haotoufa.com/about/">@{{item.name}}</a> 
   </div> 
   <div class="footer_message"> 
    <p> <span>好头发网@2016&nbsp;&nbsp;&nbsp;&nbsp;haotoufa.com</span> </p> 
   </div> 
  </footer> 
  <script src="js/jquery-1.11.1.js"></script> 
  <script src="js/jquery.flexslider.js"></script> 
  <script src="js/vue.js"></script> 
  <script>
    //菜单切换
    $("header img:last-child").click(function(){
        $(".menu").toggle();
    })
    
    

     //首页数据
     $.get('/api/indexData',function(data){
        //轮播部分
        new Vue({
        el: '#Carousel',
        data: {
            items:data.banner
        },
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
    });
       //轮播图
       $('#Carousel').flexslider({ });
       $('.Carousel').toggle();
        //热点部分
        new Vue({
            el: '#news',
            data: {
                items:data.hotData
            },
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
        });
        //发型部分
        new Vue({
            el: '#faxing',
            data: {
                items:data.faXingData.data
            },
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
        });
        new Vue({
            el: '#faxingbanner',
            data: data.faXingData.banner[0],
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
        });
           //养护部分
           new Vue({
            el: '#yangfa',
            data: {
                items:data.yangFaData.data
            },
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
        });
           new Vue({
            el: '#yangfabanner',
            data: data.yangFaData.banner[0],
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
        });
      //脱发部分
      new Vue({
        el: '#tuofa',
        data: {
            items:data.tuoFaData.data
        },
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
    });
      new Vue({
        el: '#tuofabanner',
        data: data.tuoFaData.banner[0],
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
    });
      new Vue({
        el: '#zhifa',
        data: {
            items:data.zhiFaData.data
        },
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
    });
      new Vue({
        el: '#zhifabanner',
        data: data.zhiFaData.banner[0],
                methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
    });
      $('.main_show').toggle();  
     //菜单部分
     new Vue({
        el: '#Navigation',
        data: {
            items:data.menu
        }
    });
     new Vue({
        el: '#Navigation_bottom',
        data: {
            items:data.menu
        }
    });
     if($(".Navigation").css("visibility")!="hidden"){
        $(".Navigation").css("visibility","hidden");
    }else{
        $(".Navigation").css("visibility","visible");
    };
    $(".footer_message").css("display",'block');
})





    //more加载事件

    $(".more").on("click", function(){  
        $(this).toggle();
        var template = '<div class="list-member template" v-for="item in items" style="display: none;" @click="jump(item.id)"><div class="list-left" v-if=\'item.titlepic!=""\'><img :src="item.titlepic"></div><div class="list-right" v-if=\'item.titlepic!=""\'><a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a><p>@{{item.title}}</p></div><div class="list-right middle" v-if=\'item.titlepic==""\'><a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a><p>@{{item.title}}</p></div></div>';
         var template1 = '<div class="list-member template" v-for="item in items" style="display: none;" @click="jump(item.id)"><div class="list-left" v-if=\'item.titlepic!=""\'><img :src="item.titlepic"></div><div class="list-right" v-if=\'item.titlepic!=""\'><a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a><p>@{{item.title}}</p></div><div class="list-right middle" v-if=\'item.titlepic==""\'><a :href="&quot;/column/&quot;+item.classid">@{{item.classname}}</a><p>@{{item.title}}</p></div></div>';
        var id = $(this).attr("id");

        switch(id){
            case "newsMore":
            $("#news").append(template1);
            $.get('/api/hotData/2',function(data){
              new Vue({
                  el: '#news',
                  data: {
                     items:data
                 },
                 methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
             });
              $(".template").css("display",'block');
          })
            break;
            case "faxingMore":
            $("#faxing").append(template);
            $.get('/api/faXingData/2',function(data){
              new Vue({
                  el: '#faxing',
                  data: {
                     items:data
                 },
                 methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
             });
              $(".template").css("display",'block');
          })
            break;
            case "yangfaMore":
            $("#yangfa").append(template);
            $.get('/api/yangFaData/2',function(data){
              new Vue({
                  el: '#yangfa',
                  data: {
                     items:data
                 },
                 methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
             });
              $(".template").css("display",'block');
          })
            break;
            case "tuofaMore":
            $("#tuofa").append(template);
            $.get('/api/tuoFaData/2',function(data){
              new Vue({
                  el: '#tuofa',
                  data: {
                     items:data
                 },
                 methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
             });
              $(".template").css("display",'block');
          })
            break;
            case "zhifaMore":
            $("#zhifa").append(template);
            $.get('/api/zhiFaData/2',function(data){
              new Vue({
                  el: '#zhifa',
                  data: {
                     items:data
                 },
                 methods:{
                    jump:function(id){
                      location.href='/article/'+id;
                    }
                 }
             });
              $(".template").css("display",'block');
          })
            break;
        }
    });  

</script>  
 </body>
</html>